CC	=gcc -march=i386
CFLAGS	=-Wall -O -m32 -fstrength-reduce -fomit-frame-pointer -nostdinc -I../include -fno-stack-protector
AS	=as --32
AR	=ar
LD	=ld -m elf_i386
CPP	=gcc -E -nostdinc -I../include

.c.o:
	$(CC) $(CFLAGS) \
	-c -o $*.o $<
.s.o:
	$(AS) -o $*.o $<
.c.s:
	$(CC) $(CFLAGS) \
	-S -o $*.s $<

OBJS	= memory.o

all: mm.o

mm.o: $(OBJS)
	$(LD) -r -o mm.o $(OBJS)

clean:
	rm -f *.o *.a
	for i in *.c;do rm -f `basename $$i .c`.s;done

memory.o: memory.c
